package com.engine4cloud.tdf.common.data.web.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * 分页实体列
 *
 * @author wenjie
 * @date 2022/11/29
 */
@Data
@Schema(description = "分页实体列")
public class PageInfo<T> implements Serializable {
    /**
     * 记录总数
     */
    @Schema(description = "记录总数", example = "100")
    private long total;
    /**
     * 当前页
     */
    @Schema(description = "当前页", example = "1")
    private long current;
    /**
     * 每页显示记录数
     */
    @Schema(description = "每页显示记录数", example = "10")
    private long size;
    /**
     * 数据列表
     */
    @Schema(description = "数据列表")
    private List<T> records = Collections.emptyList();
}
